{extend name="public/base" /}
{block name="pjax_container"}
<style>

.content-header>.breadcrumb>li{
    color: #999;
}
.content-header>.breadcrumb>.active{
    color: #666;
}
.content-header{
    height: 51px;
 
}
.btn-primary{
      background-color: #1890FF;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 5px 10px; 
}
.box-primary{
  border-top-color: #ecf0f5 !important;
  border-top-width: 16px;
  
}
.btn-primary:hover{
     background-color: #1890FF;
    color: #fff;
    border: none;
    opacity: .9;
    border-radius: 6px !important; 
}
.delete-one{
    background-color: ff4141 !important;
    margin-left: 15px;
    border-radius: 6px;
}
.sreachs{
       background-color: #1890FF;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    margin-left: 15px;
    padding: 7px 15px; 
}
.nav-tabs-custom {
    margin-top: 16px;
}

.magic-radio,
.magic-checkbox {
	position: absolute;
	display: none;
}
 

 
.magic-radio + label,
.magic-checkbox + label {
	position: relative;
	display: block;
	padding-left: 30px;
	cursor: pointer;
 
}
 
.magic-radio + label:before,
.magic-checkbox + label:before {
	position: absolute;
	top: 0;
	left: 0;
	display: inline-block;
	width: 20px;
	height: 20px;
        margin-top: 5px;
	content: '';
	border: 1px solid #c0c0c0;
}
.magic-radio + label:after,
  .magic-checkbox + label:after {
	position: absolute;
	display: none;
	content: '';
        margin-top: 5px;
}


 
.magic-radio:checked + label:after,
.magic-checkbox:checked + label:after {
	display: block;
}
.magic-radio + label:before {
	border-radius: 50%;
}
.magic-radio + label:after {
	top: 6px;
	left: 6px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3e97eb;
}
.magic-radio:checked + label:before {
	border: 1px solid #3e97eb;
}
.magic-radio:checked[disabled] + label:before {
	border: 1px solid #c9e2f9;
}

.magic-checkbox + label:before {
	border-radius: 3px;
}
.magic-checkbox + label:after {
	top: 2px;
	left: 7px;
	box-sizing: border-box;
	width: 6px;
	height: 12px;
	transform: rotate(45deg);
	border-width: 2px;
	border-style: solid;
	border-color: #fff;
	border-top: 0;
	border-left: 0;
}
.magic-checkbox:checked + label:before {
    border: #1890FF;
    background: #1890FF;
}
.magic-checkbox:checked[disabled] + label:before {
	border: #1890FF;
	background: #1890FF;
}

label{
    margin-left: 10px;
}
</style>
<section class="content-header">
    <ol class="breadcrumb">
        <li>统计排名</li>
        <li class="active">{$titleTypeName}</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" action="/{$Think.MODULE_NAME}/{$Think.CONTROLLER_NAME}/{$Think.ACTION_NAME}" onsubmit="return false" >
                <input type="hidden" name="id" value="{$info.id|default=0}" />
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm" style="padding:10px 2px;"><i class="fa fa-list"></i> 返回</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">

                            <div class="form-group">
                                <label class="col-sm-2 control-label">报表名称</label>
                                <div class="col-sm-5">
                                    <input class="form-control" name="name" value="{$info['name']|default=''}" placeholder="">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">报表类型</label>
                                <div class="col-sm-5" style="display: flex;">
                                <input type="radio" id="test1" class="magic-radio" name="type" value="0" {if condition="!isset($info['type']) || $info['type']==0" }checked{/if}
                                   > <label class="checkbox-inline" for="test1">积分排名</label>
                                <input type="radio"id="test2"  name="type" value="1" {if condition="isset($info['type']) && $info['type']==1" }checked{/if}
                                    class="magic-radio">  <label class="checkbox-inline" for="test2">平均分排名</label>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">包含分组</label>
                                <div class="col-sm-5" style="display: flex;flex-wrap: wrap;">
                                    {foreach name="$statistics_group" item="vo" key="ko"}
                                   <input class="magic-checkbox" id="id{$ko}" type="checkbox" name="group_id[]" value="{$vo.id}"
                                        {if condition="isset($statement_relation_group) && in_array($vo['id'], $statement_relation_group)"}checked{/if} > <label class="checkbox-inline" for="id{$ko}">{$vo.name}</label>
                                    {/foreach}
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label">基础分/工龄分计入累计</label>
                                <div class="col-sm-5" style="display: flex;">
                                <input type="radio" id="test3" class="magic-radio" name="is_join" value="0" {if condition="!isset($info['is_join']) || $info['is_join']==0" }checked{/if} class="minimal"> 
                                 <label for="test3" class="checkbox-inline">是</label>
                                <input type="radio" id="test4" class="magic-radio" name="is_join" value="1" {if condition="isset($info['is_join']) && $info['is_join']==1"
                                    }checked{/if} class="minimal">  <label for="test4" class="checkbox-inline">否</label>
                                </div>
                            </div>

                            <!--<div class="form-group">-->
                                <!--<label class="col-sm-2 control-label">查看范围:</label>-->
                                <!--<div class="col-sm-5" style="display: flex;">-->
                                   <!--<input type="radio" id="test5" class="magic-radio" name="scope_type" value="1" {if condition="!isset($info['scope_type']) || $info['scope_type']==1"}checked{/if} class="minimal"/> <label for="test5" class="checkbox-inline">查看所在分组</label>-->
                                  <!--<input type="radio" id="test6" class="magic-radio" name="scope_type" value="0" {if condition="isset($info['scope_type']) && $info['scope_type']==0"}checked{/if} class="minimal"/><label for="test6" class="checkbox-inline">查看全部分组</label>-->
                                <!--</div>-->
                            <!--</div>-->

                            <div class="form-group">
                                <label class="col-sm-2 control-label">备注</label>
                                <div class="col-sm-5"><textarea class="form-control" style="resize:none;height:155px;" name="desc" placeholder="">{$info['desc']|default=''}</textarea></div>
                            </div>

                        </div>
                        <div class="box-footer">
                            <div class="col-sm-2"></div>
                            <div class="col-sm-5">
                                <div class="btn-group pull-right">
                                    <button type="submit" class="btn btn-info pull-right submits" data-loading-text="&lt;i class='fa fa-spinner fa-spin '&gt;&lt;/i&gt; 提交">提交</button>
                                </div>
                            </div>
                        </div>
                    </div>


                </div>
            </form>
        </div>
    </div>
</section>
<script type="application/javascript">
    $(document).ready(function () {
        /*ajax页面加载icheck，有该控件的页面才需要*/
        $(".select2").select2({language:"zh-CN"});
    })
</script>
{/block}
